package com.itheima.file.mytest;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;

public class FileDemo4 {
    public static void main(String[] args) throws IOException {
        File file = new File("E:\\JavaSE_Code");
        delectDir(file);
        //FileUtils.deleteDirectory(file);
        File file1 = new File("E:\\IdeaProjects\\JavaSE_Code");
        FileUtils.copyDirectory(file1,file);
    }

    private static void delectDir(File file) {
        System.out.println("开始删除" + file);
        if (!file.delete()) {

        }
    }
}
